import request from '@/utils/axios'
import { Model } from 'echarts'


export function getUnitList(params) {
    return request({
        url: '/unit/list',
        method: 'post',
        data: params
    })
}
export function insertUnit(params) {
    return request({
        url: '/unit/insert',
        method: 'post',
        data: params
    })
}
export function updateUnit(params) {
    return request({
        url: '/unit/update',
        method: 'post',
        data: params
    })
}
export function deleteUnit(params) {
    return request({
        url: '/unit/delete',
        method: 'post',
        data: params
    })
}
// getDepartList, insertdepart, updatedepart, deletedepart


export function getDepartList(params) {
    return request({
        url: '/depart/list',
        method: 'post',
        data: params
    })
}
export function insertdepart(params) {
    return request({
        url: '/depart/insert',
        method: 'post',
        data: params
    })
}
export function updatedepart(params) {
    return request({
        url: '/depart/update',
        method: 'post',
        data: params
    })
}
export function deletedepart(params) {
    return request({
        url: '/depart/delete',
        method: 'post',
        data: params
    })
}

//



export function getStaffList(params) {
    return request({
        url: '/staff/list',
        method: 'post',
        data: params
    })
}
export function insertStaff(params) {
    return request({
        url: '/staff/insert',
        method: 'post',
        data: params
    })
}
export function updateStaff(params) {
    return request({
        url: '/staff/update',
        method: 'post',
        data: params
    })
}
export function deleteStaff(params) {
    return request({
        url: '/staff/delete',
        method: 'post',
        data: params
    })
}


export function getPositionList(params) {
    return request({
        url: '/position/list',
        method: 'post',
        data: params
    })
}
export function insertPosition(params) {
    return request({
        url: '/position/insert',
        method: 'post',
        data: params
    })
}
export function updatePosition(params) {
    return request({
        url: '/position/update',
        method: 'post',
        data: params
    })
}
export function deletePosition(params) {
    return request({
        url: '/position/delete',
        method: 'post',
        data: params
    })
}


export function getAttend(params) {
    return request({
        url: '/attend/list',
        method: 'post',
        data: params
    })
}
export function insertAttend(params) {
    return request({
        url: '/attend/insert',
        method: 'post',
        data: params
    })
}
export function updateAttend(params) {
    return request({
        url: '/attend/update',
        method: 'post',
        data: params
    })
}
export function deleteAttend(params) {
    return request({
        url: '/attend/delete',
        method: 'post',
        data: params
    })
}


//客户
export function getCustList(params){
    return request({
        url: '/cust/list',
        method: 'post',
        data: params
    })
}
export function insertCust(params)  {

    return request({
        url: '/cust/insert',
        method: 'post',
        data: params
    })
}

export function updateCust(params)  {

    return request({
        url: '/cust/update',
        method: 'post',
        data: params
    })
}

export function deleteCust(params)  {
    return request({
        url: '/cust/delete',
        method: 'post',
        data: params
    })
}


//供应商
export function getCraftList(params){
    return request({
        url: '/craft/list',
        method: 'post',
        data: params
    })
}
export function insertCraft(params)  {

    return request({
        url: '/craft/insert',
        method: 'post',
        data: params
    })
}

export function updateCraft(params)  {

    return request({
        url: '/craft/update',
        method: 'post',
        data: params
    })
}

export function deleteCraft(params)  {
    return request({
        url: '/craft/delete',
        method: 'post',
        data: params
    })
}

//工艺
export function getTechList(params){
    return request({
        url: '/tech/list',
        method: 'post',
        data: params
    })
}
export function insertTech(params)  {

    return request({
        url: '/tech/insert',
        method: 'post',
        data: params
    })
}

export function updateTech(params)  {

    return request({
        url: '/tech/update',
        method: 'post',
        data: params
    })
}

export function deleteTech(params)  {
    return request({
        url: '/tech/delete',
        method: 'post',
        data: params
    })
}




//产品单价
export function getCostList(params){
    return request({
        url: '/cost/list',
        method: 'post',
        data: params
    })
}
export function insertCost(params)  {

    return request({
        url: '/cost/insert',
        method: 'post',
        data: params
    })
}

export function updateCost(params)  {

    return request({
        url: '/cost/update',
        method: 'post',
        data: params
    })
}

export function deleteCost(params)  {
    return request({
        url: '/cost/delete',
        method: 'post',
        data: params
    })
}


export function getProductList(params) {
    return request({
        url: '/product/list',
        method: 'post',
        data: params
    })
}


//仓库管理
export function getStoreList(params){
    return request({
        url: '/store/list',
        method: 'post',
        data: params
    })
}
export function insertStore(params)  {

    return request({
        url: '/store/insert',
        method: 'post',
        data: params
    })
}

export function updateStore(params)  {

    return request({
        url: '/store/update',
        method: 'post',
        data: params
    })
}

export function deleteStore(params)  {
    return request({
        url: '/store/delete',
        method: 'post',
        data: params
    })
}

//库存
export function getStoreSaveList(params){
    return request({
        url: '/storeList/list',
        method: 'post',
        data: params
    })
}
export function insertStoreSave(params)  {
    return request({
        url: '/storeList/insert',
        method: 'post',
        data: params
    })
}

export function updateStoreSave(params)  {

    return request({
        url: '/storeList/update',
        method: 'post',
        data: params
    })
}

export function deleteStoreSave(params)  {
    return request({
        url: '/storeList/delete',
        method: 'post',
        data: params
    })
}
